import 'package:flutter_ahj_app/app/APIConfiguration.dart';
import 'package:flutter_ahj_app/base/basewidget/HttpUtils/HttpBaseConst.dart';
import 'package:flutter_ahj_app/base/basewidget/HttpUtils/HttpClient.dart';
import 'package:flutter_ahj_app/base/basewidget/HttpUtils/HttpNoTokenClient.dart';
import 'package:flutter_ahj_app/base/basewidget/HttpUtils/HttpOtherClient.dart';

class HttpRenZhengRequest {
  /*
    * 上传企业认证
    * */
  static Stream updataQyRenZheng(
      String certName, String certificationNo, String coverFilePath) {
    Map<String, String> map = new Map();
    map["certName"] = certName;
    map["certificationNo"] = certificationNo;
    map["coverFilePath"] = coverFilePath;
    return HttpClient.getInstance().post("ahj/v1/certification/company", map);
  }

  /*
    * 获取企业认证
    * */
  static Stream queryQyRenZheng() {
    Map<String, String> map = new Map();
    return HttpClient.getInstance()
        .get("ahj/v1/certification/company", params: map);
  }

  /*
    * 查询企业认证状态
    * */
  static Stream queryQyRenZhengState() {
    Map<String, String> map = new Map();
    return HttpClient.getInstance()
        .get("ahj/v1/certification/company/status", params: map);
  }

  /// 获取已通过认证的企业列表
  static Stream companyList(String text) {
    Map<String, String> map = new Map();
    map["companyName"] = text;
    map["current"] = "${HttpBaseConst.pageIndex}";
    map["size"] = "500";
    return HttpClient.getInstance()
        .get("ahj/v1/certification/passed/company", params: map);
  }
  /// 安环家未读消息数量
  static Stream cooperationNewsCount(String role) {
    Map<String, String> map = new Map();
    map["role"] = "2";
    map["tenantId"] = "ahj";
    map["version"] = "5";
    return HttpClient.getInstance()
        .get("cooperation/v1/schedules/ahj/msg/count", params: map);
  }
}